/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package it.uninsieme.common;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import javax.faces.model.SelectItem;

/**
 *
 * @author Federico
 */
public class Utility {

    public static void ordinaListaLabel(List<SelectItem> daSortare) {
        Collections.sort(daSortare, new Comparator<SelectItem>() {
            @Override
            public int compare(SelectItem o1, SelectItem o2) {
                return o1.getLabel().compareTo(o2.getLabel());
            }
        });
    }

}
